package cn.jsj.dispose;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 删除实习律师信息处理类
 * @author LI
 *
 */
 public class DeletePracLawyerInfo extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
	throws ServletException, IOException {
		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("进入删除实习律师信息处理类");

		//获得实习律师ID
		String pracLawyerId=request.getParameter("lawyerID");

		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("获得的参数为--------->"+pracLawyerId);

		//删除实习律师信息
		cn.jsj.dao.TblPracticeLawyerDAO tpld=new cn.jsj.dao.TblPracticeLawyerDAO();
		int deleteSuccess=tpld.deletePracLawyerInfo(Integer.parseInt(pracLawyerId));

		//调试信息
		cn.jsj.utils.SysLogger.PrintInfo("删除结果------->"+deleteSuccess);

		//输出信息到客户端
		java.io.PrintWriter out=response.getWriter();
		if(deleteSuccess==1){
			out.println("{message:'删除成功！！！'}");
		}
		else{
			out.println("{message:'删除失败！！！'}");
		}
		out.flush();
		out.close();

	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
	throws ServletException, IOException {
		doGet(request,response);
	}

}